<template>
  <el-select filterable>
    <el-option v-for="item in roleList" :key="item.role_id" :value="item.role_id" :label="item.name"></el-option>
  </el-select>
</template>

<script setup>
import { roleServer } from '@/api'
import { ref } from 'vue';
const roleList = ref([]);
const getRoleList = async () => {
  const res = await roleServer.get();
  roleList.value = res.data || [];
};
getRoleList();
</script>